#!/bin/bash
set -e
ulimit -n 1000000
cd "{{ deploy_dir }}" || exit 1

export RUST_BACKTRACE=1

export TZ=${TZ:-/etc/localtime}

echo -n 'sync ... '
stat=$(time sync)
echo ok
echo $stat

nohup ./bin/tikv-importer -C ./conf/tikv-importer.toml &> log/tikv_importer_stderr.log &

echo $! > "status/tikv-importer.pid"
